package com.zz.feign;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.nio.file.Path;

@Component
public class ExamControllerFallbackFactory implements FallbackFactory<ExamService> {


    @Override
    public ExamService create(Throwable cause) {
        return new ExamService() {
            @Override
            public String forwardFile(MultipartFile  file) {
                return "调用失败,降级类启动";
            }
        };
    }
}

